-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
REF: Parametrize value_counts tests #28537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Not sure about reducing the number of cases. Looking into the history of
the test may shed some light.
…On Thu, Sep 19, 2019 at 3:03 PM Daniel Saxton ***@***.***> wrote:
Parametrizes the for loop in test_series_groupby_value_counts. As a side
note, this test seems to run for a pretty long time (a minute and a half);
should it operate on less data perhaps?
------------------------------
You can view, comment on, or merge this pull request online at:
#28537
Commit Summary
- REF: Parametrize value_counts tests
File Changes
- *M* pandas/tests/groupby/test_value_counts.py
<https://github.com/pandas-dev/pandas/pull/28537/files#diff-0> (35)
Patch Links:
- https://github.com/pandas-dev/pandas/pull/28537.patch
- https://github.com/pandas-dev/pandas/pull/28537.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#28537?email_source=notifications&email_token=AAKAOIRYYZGEICZGM5XL6KTQKPLJDA5CNFSM4IYPPMYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HMQLQSQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOIVFWNSFHKWE5653L4TQKPLJDANCNFSM4IYPPMYA>
.
|
Yea a minute and a half for one test is too much. Is there a way to get it down to a few seconds and still get the same measurement? |
@@ -52,29 +52,28 @@ def seed_df(seed_nans, n, m): | |||
|
|||
@pytest.mark.slow | |||
@pytest.mark.parametrize("df, keys, bins, n, m", binned, ids=ids) | |||
def test_series_groupby_value_counts(df, keys, bins, n, m): | |||
@pytest.mark.parametrize( | |||
"isort, normalize, sort, ascending, dropna", list(product((False, True), repeat=5)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really a fan of using itertools
to generate parametrization. Could you instead write this as:
@pytest.mark.parametrize("isort", [True, False])
@pytest.mark.parametrize("normalize", [True, False])
...
Equivalent at the end of the day but I think clearer and match the rest of the codebase
this is a comprehensive test and is marked as slow, so perf is ok, other than @WillAyd comment lgtm. |
Thanks @dsaxton |
Parametrizes the for loop in
test_series_groupby_value_counts
. As a side note, this test seems to run for a pretty long time (a minute and a half); should it operate on less data perhaps?